<!-- 成功申请管理 -->
<template>
  <div>
    <!-- 信息表格 -->
    <tableData :visible.sync="dialogformvisible" :isdeny="isdeny" :ispass="ispass"></tableData>
    <!-- 分页-->
    <div class="block">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="page.page_number + 1"
        :page-sizes="[10, 20, 30, 50]"
        :page-size="page.page_size"
        layout="total, sizes, prev, pager, next, jumper"
        background
        :total="page.total_elements"
        v-if="page.total_elements != 0"
      >
      </el-pagination>
    </div>
  </div>
</template>
<script>
import tableData from "@/components/businessFirm/tableData.vue";
import { mapActions, mapState,mapGetters } from "vuex";
export default {
  components: {
    tableData,
  },
  data() {
    return {
            dialogformvisible: false,
      isdeny:false,
      ispass:true,
    };
  },
  mounted() {
    this["getHistoryData"]({isPass:false, page: 0, size: 10 });
  },
  methods: {
    ...mapActions("adminBusiness", ["getHistoryData"]),
    //每页数量改变时触发
    handleSizeChange(val) {
      this["getHistoryData"]({ isPass:false,page: this['pageNumber'], size: val });
    },
    //当前页数改变时触发
    handleCurrentChange(val) {
      this["getHistoryData"]({isPass:false, page: val - 1, size: this['pageSize'] });
    },
  },
  computed: {
    ...mapState('adminBusiness',[
      'page'
    ]),
    ...mapGetters('adminBusiness',[
        'pageNumber',
        'pageSize'
      ])
  },
  watch: {
    // 监听mapState中的变量，当数据变化（有值、值改变等），
    // 保证能拿到完整的数据，不至于存在初始化没有数据的问题，然后可以赋给本组件data中的变量
  },
};
</script>
<style  lang='scss' scoped>
@import "@/assets/css/adminPerson_y.scss";
.el-form-item__content {
  margin-left: 31px !important;
  line-height: normal !important;
  textarea {
    min-height: 200px !important;
  }
}
</style>
